package dayin_time;

import java.util.Calendar;
//java 编程，打印昨天的当前时刻
public class yesterdayCurrent {
    public static void main(String[] args) {

        //当前时刻
        Calendar cal= Calendar.getInstance();
        //昨天当前时刻
       cal.add(Calendar.DATE,-1);
        System.out.println(cal.getTime());
    }
}
